package com.siburian.MyStuff;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.content.Intent;
import android.widget.Toast;

public class ChooseMenu extends Activity{
	Button Belajar;
	Button Test;
	Button Statistik;
	Button Profil;
	Button Setup;
	public static String MenuPilihan = "";
	private static void getTypeStudy(String pilihanSiswa){
		ChooseMenu.MenuPilihan = pilihanSiswa;
	}
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.choose_menu);
        Belajar = (Button) findViewById(R.id.btnPageBelajar);
        Belajar.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				MenuPilihan = "Belajar";
				if(ListProfil.profileID == 0){
					Toast.makeText(getBaseContext(), "Anda Belum memilih profil silahkan pilih profil dulu",
					Toast.LENGTH_LONG).show();
				}
				else{
					Intent i = new Intent(ChooseMenu.this,ChooseKelas.class);
					startActivity(i);
				}
			}
		});
        Test = (Button) findViewById(R.id.btnTesPage);
        Test.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				MenuPilihan = "Test";
				if(ListProfil.profileID == 0){
					Toast.makeText(getBaseContext(), "Anda Belum memilih profil silahkan pilih profil dulu",
					Toast.LENGTH_LONG).show();
				}
				else{
					Intent i = new Intent(ChooseMenu.this,ChooseKelas.class);
					startActivity(i);
				}
			}
		});

        Profil = (Button) findViewById(R.id.btnViewProfil);
        Profil.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent i = new Intent(ChooseMenu.this,FiturProfil.class);
				startActivity(i);
			}
		});

        Setup = (Button) findViewById(R.id.btnViewSetup);
        Setup.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent i = new Intent(ChooseMenu.this,ListBelajar.class);
				startActivity(i);
			}
		});
        Statistik = (Button) findViewById(R.id.btnStatisticPage);
        Statistik.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				MenuPilihan = "Statistik";
				if(ListProfil.profileID == 0){
					Toast.makeText(getBaseContext(), "Anda Belum memilih profil silahkan pilih profil dulu",
					Toast.LENGTH_LONG).show();
				}
				else{
					Intent i = new Intent(ChooseMenu.this,ChooseKelas.class);
					startActivity(i);
				}
			}
		});
    }
}
